<script setup>
let arrs = [5,6,1,22,3,7];

// let result = arrs.reduce((prev,current,index)=>prev+current,0)


let result = arrs.reduce((prev,current,index)=>{
	prev+=current
	if(index === arrs.length-1){
		return prev / arrs.length
	}else{
		return prev
	}
},0)
console.log(result);
</script>
<template>
    <view class="">

    </view>
</template>
<style lang="scss" scoped>

</style>
